// import './assets/main.css'
import { createApp } from "vue";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import App from "./App.vue";
import router from "./router/index";
//element-plus样式引入
import "element-plus/dist/index.css";
//暗黑模式css
import "element-plus/theme-chalk/dark/css-vars.css";
//element-plus组件按需引入
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
app.use(pinia);
app.use(router);
//全局注册element-plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.mount("#app");
